package com.htht.smartschool.common.model;

import java.lang.reflect.Field;

public class Entity {

	private Long id;
	private Long starttime;
	private Long endtime;
	private Long total;
	
	private Long currentpage;
	private Long pagesize;
	

	public Entity() {
		super();
	
	}	
	
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getStarttime() {
		return starttime;
	}

	public void setStarttime(Long starttime) {
		this.starttime = starttime;
	}

	public Long getEndtime() {
		return endtime;
	}

	public void setEndtime(Long endtime) {
		this.endtime = endtime;
	}
	
	public Object getUpdateEntity(Entity ent ,Class<?> clazz){
		for (Field f : ent.getClass().getDeclaredFields()) {
		    f.setAccessible(true);
		    try {
				if (f.get(ent) != null && !f.getName().equalsIgnoreCase("serialVersionUID")) {
				   f.set(ent, f.get(ent));
				}
			} catch (IllegalArgumentException e) {
				e.printStackTrace();
			} catch (IllegalAccessException e) {
				e.printStackTrace();
			}
		}
		return ent;
	}

	public Long getTotal() {
		return total;
	}

	public void setTotal(Long total) {
		this.total = total;
	}

	public Long getCurrentpage() {
		return currentpage;
	}

	public void setCurrentpage(Long currentpage) {
		this.currentpage = currentpage;
	}

	public Long getPagesize() {
		return pagesize;
	}

	public void setPagesize(Long pagesize) {
		this.pagesize = pagesize;
	}
}
